<!DOCTYPE html>
<html lang="en">
<head>
    {% load staticfiles %}
    <meta charset="UTF-8">
    <title>个人信息确认</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css"
          integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.slim.min.js"
            integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
            crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
            integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
            crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/js/bootstrap.min.js"
            integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
            crossorigin="anonymous"></script>


    <style>
        body {
            background-color: #f7f7f7;
        }

        .footer {
        {#position: fixed;#} bottom: 0;
            display: flex;
            flex-direction: column;
            width: 100%;
        {#vertical-align: center;#}

        }

        .footer-p {
            display: flex;
            flex-direction: column;
            font-size: 12px;
            color: #5a6268;
            justify-items: center;
            align-items: center;
        }
    </style>
</head>
<body>
<div class="container">
    {#导航栏#}
    <nav class="navbar navbar-expand-lg navbar-light bg-light">
        <a class="navbar-brand" href="#">青岛大学 每日疫情上报</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
                aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav mr-auto">
                <li class="nav-item active">
                    <a class="nav-link" href="#">表单 <span class="sr-only">(current)</span></a>
                </li>
                <li class="nav-item active">
                    <a class="nav-link" href="../anysis/">统计 <span class="sr-only">(current)</span></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="../index/">退出</a>
                </li>
            </ul>
        </div>
    </nav>
    {#    个人信息块#}
    <div class="modal fade" id="new">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">提示</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    您的个人信息不完善，请完善个人信息
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" onclick="$(location).prop('href', '../form1/')">
                        点我去完善
                    </button>
                </div>
            </div>
        </div>
    </div>
    <form method="post" action="../form2/">
        {% csrf_token %}
        <div class="container">
            <div class="form-group">
                {% ifequal user_type 2 %}
                    <label for="exampleInputEmail1">工号</label>
                {% else %}
                    <label for="exampleInputEmail1">学号</label>
                {% endifequal %}
                <input type="text" class="form-control" value="{{ user.userid }}" readonly>
            </div>
            <div class="form-group">
                <label for="exampleInputEmail1">类别</label>
                <input type="text" class="form-control" value="{{ user.usertype }}" readonly>
            </div>
            <div class="form-group">
                <label for="exampleInputEmail1">姓名</label>
                <input type="text" class="form-control" value="{{ user.realname }}" readonly>
            </div>
            <div class="form-group">
                <label for="exampleInputEmail1">性别</label>
                <input type="text" class="form-control" value="{{ user.gander }}" readonly>
            </div>
            <div class="form-group">
                {% ifequal user_type 2 %}
                    <label for="exampleInputEmail1">部门</label>
                {% else %}
                    <label for="exampleInputEmail1">学院</label>
                {% endifequal %}
                <input type="text" class="form-control" value="{{ user.department }}" readonly>
            </div>
            {% ifnotequal user_type 2 %}
                <div class="form-group">
                    <label for="exampleInputEmail1">班级</label>
                    <input type="text" class="form-control" value="{{ user.batch }}" readonly>
                </div>
            {% endifnotequal %}

            <div class="form-group">
                <label for="exampleInputEmail1">联系电话</label>
                <input type="text" class="form-control" value="{{ userinfo.phonenumber }}" readonly>
            </div>
            <div class="form-group">
                <label for="exampleInputEmail1">现居住地</label>
                <input type="text" class="form-control" value="{{ userinfo.residence }}" readonly>
            </div>


        </div>
        <div class="btn-group">

            {% if Complete %}
                <button class="btn btn-info" type="button" id="complete" onclick="window.location.href='../form1/'">修改个人信息</button>
                <button class="btn btn-danger" type="submit" id="submit">开始上报</button>
            {% else %}
                <button class="btn btn-info" type="button" id="complete" onclick="window.location.href='../form1/'">完善个人信息</button>
            {% endif %}
        </div>
    </form>


</div>
<footer class="footer">
        <div class="footer-p">
            <p>青岛大学 版权所有 ©2020</p>
            <p>电子邮件：<a href="mailto:ecampus@qdu.edu.cn">ecampus@qdu.edu.cn</a></p>
            <p>青岛大学 智慧校园服务创新协会 提供技术支持</p>

        </div>
    </footer>
{% if Complete %}
{% else %}
<script>
    $(document).ready(function () {
        $("#new").modal("show")
    })
</script>
{% endif %}
</body>
</html>